<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/14
  Time: 20:57
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="static/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="static/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="static/themes/demo.css">
    <link rel="stylesheet" type="text/css" href="static/themes/color.css">
    <script type="text/javascript" src="static/jquery.min.js"></script>
    <script type="text/javascript" src="static/jquery.easyui.min.js"></script>
    <%--声明js代码域--%>
    <script type="text/javascript">
        /****菜单和选项卡的联动****/
        $(function () {
            $("#menuTree").tree({
                onClick:function (node){
                    if(node.attributes.isparent=="1"){
                        return
                    }else{
                        var flag = $("#menuTabs").tabs('exists',node.text);
                        if(flag){
                            $("#menuTabs").tabs('select',node.text);
                        }else {
                            $("#menuTabs").tabs('add',{
                                title:node.text,
                                closable:true,
                                content:"<iframe src='"+node.attributes.url+"' width='99%' height='99%' style='border: none'></iframe>"
                            })
                        }
                    }
                }
            })
        })
    </script>
</head>
<body class="easyui-layout">
<%--头部--%>
    <div data-options="region:'north',split:false" style="height:75px;">
        <%--使用嵌套布局将头部分为三部分--%>
        <div class="easyui-layout" data-options="fit:true">
            <%--左侧logo--%>
            <div data-options="region:'west',border:false" style="width:20%;text-align: center;background-image: url('static/images/bg.png')">
                <img src="static/images/logo.png" alt="" style="width: 70%;height: 70%;margin-top: 13px">
            </div>
                <%--中间标题--%>
            <div data-options="region:'center',border:false" style="background-image: url('static/images/bg.png');text-align: center">
                <span style="color: white;font-size: 25px;position: relative;top:25px ">Ting&nbsp;域&nbsp;主&nbsp;持&nbsp;人&nbsp;管&nbsp;理&nbsp;系&nbsp;统</span>
            </div>
                <%--右侧登录信息--%>
            <div data-options="region:'east',border:false" style="width:20%;background-image: url('static/images/bg.png');text-align: left">
                <span style="position: relative;top:35px;font-size: 15px">
                    <span style="color: white">&nbsp;&nbsp;欢迎：${sessionScope.admin.aname}</span>
                    &nbsp;&nbsp;
                    <span ><a href="login.jsp" style="color: white">退出</a> </span>
                </span>
            </div>
        </div>
    </div>

<%--底部--%>
    <div data-options="region:'south',split:false" style="height:50px;"></div>
<%--菜单--%>
    <div data-options="region:'west',title:'系统菜单',split:false,collapsible:false" style="width:150px;">
        <%--声明异步树组件--%>
            <ul class="easyui-tree" id="menuTree" data-options="url:'menu/menuInfo'"></ul>
    </div>
<%--中心--%>
    <div data-options="region:'center'" style="padding:5px;background:#eeeeee;">
        <%--创建选项卡组件显示菜单资源--%>
            <div id="menuTabs" class="easyui-tabs" data-options="fit:true" >
                <div title="首页" style="padding:20px;display:none;">
                </div>
            </div>
    </div>
</body>
</html>
